<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改swagger接口')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-swagger-edit" th:object="${swagger}">
            <input id="swaggerId" name="swaggerId" th:field="*{swaggerId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">项目名称：</label>
				<div class="col-sm-8">
					<input id="projectName" name="projectName" th:field="*{projectName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">模块名称：</label>
				<div class="col-sm-8">
					<input id="swaggerName" name="swaggerName" th:field="*{swaggerName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">接口地址：</label>
				<div class="col-sm-8">
					<input id="swaggerUrl" name="swaggerUrl" th:field="*{swaggerUrl}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">API-DOC地址：</label>
				<div class="col-sm-8">
					<input id="swaggerJsonUrl" name="swaggerJsonUrl" th:field="*{swaggerJsonUrl}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">API-JSON：</label>
				<div class="col-sm-8">
					<textarea id="jsonStr" name="jsonStr" th:field="*{jsonStr}"    class="form-control" ></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "tool/swagger";
		$("#form-swagger-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-swagger-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
